import { createRouter, createWebHistory } from "vue-router";
const ModulesFile = import.meta.glob('./*/index.js',{ eager: true })
const RouterList = [];
Object.values(ModulesFile).map(mod => {
    if(mod.default)
    {
        RouterList.push(...mod.default)
    }
})

RouterList.push(
    {
        path:'/',
        name:'Home',
        component:() => import('../components/Home.vue')
    },
    {
        path:'/connect',
        component:() => import('../components/Connect.vue')
    },
)

export default createRouter({
    history: createWebHistory(),
    routes: RouterList
})